<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>系统登录</title>
	<!-- 样 式 文 件 -->
	<link rel="stylesheet" href="/static/component/pear/css/pear.css" />
	<link rel="stylesheet" href="/static/component/admin/css/other/login.css" />
</head>
<style>

</style>
<!-- 代 码 结 构 -->
<body>
<div class="login-page">
	<div class="layui-row">
		<div class="layui-col-sm6 login-bg">
			<ul class="circles">
				<li></li>
				<li></li>
				<li></li>
				<li></li>
				<li></li>
				<li></li>
				<li></li>
				<li></li>
				<li></li>
				<li></li>
			</ul>
			<div style="margin-left: 100px">
				<img class="login-bg-img" src="/static/component/admin/images/login-box-bg-9027741f.svg" alt="" />
				<div style="font-size: 32px;color: #fff;margin-top: 50px">{:GetConfig('system','system_name')}</div>
				<div style="font-size: 16px;color: #fff;margin-top: 5px">运营自由,收款自主</div>
			</div>

		</div>
		<div class="layui-col-sm6 login-form">
			<div class="layui-form">
				<div class="form-center">
					<div class="form-center-box">
						<div class="top-log-title">
							<img class="top-log" src="{:GetConfig('system','system_logo')}" alt="" />
							<span>欢迎登录</span>
						</div>

						<div style="margin-top: 30px;">
							<div class="layui-form-item">
								<div style="text-align: left;font-weight: 700;font-size: 16px;margin-bottom: 10px">账户</div>
								<div class="layui-input-wrap">
									<div class="layui-input-prefix">
										<i class="layui-icon layui-icon-username"></i>
									</div>
									<input lay-verify="required" name="user" placeholder="请输入您的账号" autocomplete="off"
										   class="layui-input">
								</div>
							</div>
							<div class="layui-form-item">
								<div style="text-align: left;font-weight: 700;font-size: 16px;margin-bottom: 10px">密码</div>
								<div class="layui-input-wrap">
									<div class="layui-input-prefix">
										<i class="layui-icon layui-icon-password"></i>
									</div>
									<input type="password" name="upass" value=""
										   lay-verify="required" placeholder="请输入密码" autocomplete="off"
										   class="layui-input" lay-affix="eye">
								</div>
							</div>

							<div class="login-btn">
								<button type="button" lay-submit lay-filter="login" class="layui-btn login">登 录</button>
							</div>

						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- 资 源 引 入 -->
<script src="/static/component/layui/layui.js"></script>
<script src="/static/component/pear/pear.js"></script>
<script>
	layui.use(['form', 'button', 'popup','http'], function() {
		var form = layui.form;
		var button = layui.button;
		var popup = layui.popup;

		// 登 录 提 交
		form.on('submit(login)', function(data) {

			var post=data.field || [];
			layui.http.SendAjax('/admin/index/login/', post, [], function (res) {
				if (res.code==200)
				{
					var url=res.data.url || '/admin/';
					button.load({
						elem: '.login',
						time: 500,
						done: function() {
							popup.success("登录成功", function() {
								location.href = url
							});
						}
					})
					return false;
				}
				layer.alert(res.msg, {icon: 0, title: '温馨提示'});
			})
		});
	})
</script>
</body>
</html>
